package org.jeecg.common.modules.apiPermission.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.modules.apiPermission.entity.ApiPermission;
import org.jeecg.common.util.enums.BusinessTypeEnum;

import java.util.Set;

/**
 * @author guoyh
 * @ClassName ApiPermissionService
 * @Description
 * @since 2020/8/11 00:05
 **/
public interface IApiPermissionService extends IService<ApiPermission> {

    /**
     * 是否有权限访问
     *
     * @param username
     * @param businessTypeEnum
     * @param url
     * @return
     */
    boolean hasPermission(String username, BusinessTypeEnum businessTypeEnum, String url);

    /**
     * 获取角色下所有权限
     *
     * @param businessTypeEnum
     * @return
     */
    Set<String> queryByBusinessEnum(BusinessTypeEnum businessTypeEnum);
}
